package com.witmore.neutron.ai.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 插件执行记录表
 * </p>
 *
 * @author 豆子高
 * @since 2025-07-29
 */
@Getter
@Setter
@TableName("neutron_plugin_execution_log")
public class PluginExecutionLogDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 会话ID
     */
    @TableField("session_id")
    private String sessionId;

    /**
     * 智能助手ID
     */
    @TableField("agent_id")
    private Integer agentId;

    /**
     * 智能助手编码
     */
    @TableField("agent_code")
    private String agentCode;

    /**
     * 插件ID
     */
    @TableField("plugin_id")
    private Integer pluginId;

    /**
     * 插件编码
     */
    @TableField("plugin_code")
    private String pluginCode;

    /**
     * 执行状态(SUCCESS/FAILED)
     */
    @TableField("execution_status")
    private String executionStatus;

    /**
     * 请求内容
     */
    @TableField("request_content")
    private String requestContent;

    /**
     * 响应内容
     */
    @TableField("response_content")
    private String responseContent;

    /**
     * 错误信息
     */
    @TableField("error_message")
    private String errorMessage;

    /**
     * 执行耗时(ms)
     */
    @TableField("execution_time")
    private Long executionTime;

    @TableField("create_time")
    private LocalDateTime createTime;
} 